{% extends extends_template %}

{% block location %}
     <div class="nav"><a href="{% url accounts %}">Accounts</a></div>
     <div class="nav"><a href="{% url transfer %}">Transfer</a></div>
{% endblock %}

{% block content %}

{% if form %}
<form action="{% url transfer %}" method="post">
{% csrf_token %}
    <table class="form">
    {% for field in form %}
    
        <tr>
            <td>
                {{ field.label_tag }}
            </td>
        </tr>
        
        {% for error in field.errors %}
        <tr>
            <td>
                <span class="error">{{ error }}</span>
            </td>
        </tr>
        {% endfor %}
        
        <tr>
            <td>
                {{ field }}
            </td>
        </tr>
        
    {% endfor %}
        <tr>
            <td><input class="submit" type="submit" value="Transfer" /></td>
        </tr>
    </table>
</form>
{% else %}
    <p>Transfer complete</p>
{% endif %}

{% endblock %}
